| Previous | Chapter contents | Chapter top | Section top | Next |
You can define a routine to respond to a node's being left.
pascal OSErr MyLeavingNodeProc (
QTVRInstance qtvr,
UInt32 fromNodeID,
UInt32 toNodeID,
Boolean *cancel,
SInt32 refCon);
Your MyLeavingNodeProc procedure is called whenever a node is left, either in response to user actions or in response to QuickTime VR Manager functions that change nodes (such as QTVRGoToNodeID ). Your procedure can do any processing it deems necessary.
Before returning, your procedure should set the Boolean value pointed to by the cancel parameter to false to accept the move from fromNodeID to toNodeID . Set that value to true to cancel the move and to remain at the node specified by the fromNodeID parameter.
Use QTVRSetLeavingNodeProc (link) to install a node-leaving procedure. See Listing 2-10 for a sample node-leaving procedure.
| Previous | Chapter contents | Chapter top | Section top | Next |